A generic top-down dynamic-programming approach to prefix-free coding
نویسندگان
چکیده
Given a probability distribution over a set of n words to be transmitted, the Huffman Coding problem is to find a minimal-cost prefix free code for transmitting those words. The basic Huffman coding problem can be solved in O(n log n) time but variations are more difficult. One of the standard techniques for solving these variations utilizes a top-down dynamic programming approach. In this paper we show that this approach is amenable to dynamic programming speedup techniques, permitting a speedup of an order of magnitude for many algorithms in the literature for such variations as mixed radix, reserved length and one-ended coding. These speedups are immediate implications of a general structural property that permits batching together the calculation of many DP entries. Work of all of the authors was partially supported by Hong Kong CERG grant 613507. Work of the 2nd and 3rd authors also partially supported by a grant from the National Natural Science Foundation of China (No. 60573025) and by the Shanghai Leading Academic Discipline Project, project number B114.
منابع مشابه
A dynamic programming algorithm for constructing optimal "1"-ended binary prefix-free codes
The generic Huffman-Encoding Problem of finding a minimum cost prefix-free code is almost completely understood. There still exist many variants of this problem which are not as well understood, though. One such variant, requiring that each of the codewords ends with a “1,” has recently been introduced in the literature with the best algorithms known for finding such codes running in exponentia...
متن کاملLock-free parallel dynamic programming
We show a method for parallelizing top down dynamic programs in a straightforward way by a careful choice of a lock-free shared hash table implementation and randomization of the order in which the dynamic program computes its subproblems. This generic approach is applied to dynamic programs for knapsack, shortest paths, and RNA structure alignment, as well as to a state-of-the-art solution for...
متن کاملOptimal Prefix-Free Codes for Unequal Letter Costs: Dynamic Programming with the Monge Property
In this paper we discuss a variation of the classical Huffman coding problem: finding optimal prefix-free codes for unequal letter costs. Our problem consists of finding a minimal cost prefix-free code in which the encoding alphabet consists of unequal cost (length) letters, with lengths α and β. The most efficient algorithm known previously required O(n) time to construct such a minimal-cost s...
متن کاملOptimal Alphabet Partitioning for Semi-Adaptive Coding
Practical applications that employ entropy coding for large alphabets often partition the alphabet set into two or more layers and encode each symbol by using some suitable prefix coding for each layer. In this paper we formulate the problem of optimal alphabet partitioning for the design of a two layer semi-adaptive code and give a solution based on dynamic programming. However, the complexity...
متن کاملOptimal Alphabet Partitioning for Semi-Adaptive Coding of Sources of Unknown Sparse Distributions
Practical applications that employ entropy coding for large alphabets often partition the alphabet set into two or more layers and encode each symbol by using some suitable prefix coding for each layer. In this paper we formulate the problem of optimal alphabet partitioning for the design of a two layer semiadaptive code and give a solution based on dynamic programming. However, the complexity ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2009